package com.tsingtao.springcloudproject1.feign;

import com.tsingtao.springcloudproject1.config.LoadBalancerConfig;
import com.tsingtao.springcloudproject1.entity.Project2;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author lihongyan
 */
@LoadBalancerClient(name = "springcloudproject2", configuration = LoadBalancerConfig.class)
@FeignClient(name = "springcloudproject2")
public interface Project2FeignClient {

    @GetMapping("/config/self-text")
    String getSelfText();

    @PostMapping("/seata/insert")
    int insert(@RequestBody Project2 project2);
}
